<?php $paginator=$this->{0};?>
<?php if ($paginator->pageCount): ?>

<div class="pagination">

	<!-- <div class="limit">
		Tổng số dòng: <?php //echo $paginator->getTotalItemCount();?>
	</div> -->
		
	<div class="button2-right <?php echo isset($paginator->previous)?"":"off"?>">
		<div class="prev">			
			<?php if (isset($paginator->previous)): ?>
			  	<a href="<?php echo $paginator->previous ?>">Về trước</a>
			<?php else: ?>
			  	<span>Về trước</span>
			<?php endif; ?>			
		</div>
	</div>
	
	<div class="button2-left">
		<div class="page">
			<?php foreach ($paginator->pagesInRange as $page):?>
  				<? if ($page != $paginator->current):?>
    				<a href="<?php echo $page ?>"><?php echo $page; ?></a>
  				<?php else: ?>
  					<span><?php echo $page;?></span>
  				<?php endif; ?>
			<?php endforeach; ?>		
		</div>
	</div>
	
	<div class="button2-left <?php echo isset($paginator->next)?"":"off"?>">	
		<div class="next">
			<?php if (isset($paginator->next)): ?>
			  	<a href="<?php echo $paginator->next ?>">Tiếp theo</a>
			<?php else: ?>
			  	<span>Tiếp theo</span>
			<?php endif; ?>
		</div>
	</div>
	
	<div class="limit">Trang <?php echo $paginator->current; ?> / <?php echo $paginator->pageCount?></div>
	
	<input type="hidden" id="page" name="page" />
	<input type="hidden" id="order" name="order" value="<?php echo Zend_Controller_Front::getInstance()->getRequest()->getParam('order');?>"/>
</div>

<?php endif;?>